home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QD3DIO.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  22.8 KB  |  529 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3DIO.p
  3.  
  4.      Contains:    QuickDraw 3D IO API                                                
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.5.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QD3DIO;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QD3DIO__}
  28. {$SETC __QD3DIO__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QD3DIOIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __QD3D__}
  35. {$I QD3D.p}
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED __QD3DDRAWCONTEXT__}
  39. {$I QD3DDrawContext.p}
  40. {$ENDC}
  41. {$IFC UNDEFINED __QD3DVIEW__}
  42. {$I QD3DView.p}
  43. {$ENDC}
  44.  
  45.  
  46. {$PUSH}
  47. {$ALIGN POWER}
  48. {$LibExport+}
  49.  
  50. {*****************************************************************************
  51.  **                                                                              **
  52.  **                                    Basic Types                                 **                                                    
  53.  **                                                                              **
  54.  ****************************************************************************}
  55.  
  56. TYPE
  57.     TQ3Uns8                                = UInt8;
  58.     TQ3Int8                                = SInt8;
  59.     TQ3Uns16                            = INTEGER;
  60.     TQ3Int16                            = INTEGER;
  61.     TQ3Uns32                            = LONGINT;
  62.     TQ3Int32                            = LONGINT;
  63. {$IFC TARGET_OS_MAC }
  64.     TQ3Uns64Ptr = ^TQ3Uns64;
  65.     TQ3Uns64 = RECORD
  66.         hi:                        LONGINT;
  67.         lo:                        LONGINT;
  68.     END;
  69.  
  70.     TQ3Int64Ptr = ^TQ3Int64;
  71.     TQ3Int64 = RECORD
  72.         hi:                        LONGINT;
  73.         lo:                        LONGINT;
  74.     END;
  75.  
  76. {$ELSEC}
  77.     TQ3Uns64 = RECORD
  78.         lo:                        LONGINT;
  79.         hi:                        LONGINT;
  80.     END;
  81.  
  82.     TQ3Int64 = RECORD
  83.         lo:                        LONGINT;
  84.         hi:                        LONGINT;
  85.     END;
  86.  
  87. {$ENDC}  {TARGET_OS_MAC}
  88.  
  89.     TQ3Float32                            = Single;
  90.     TQ3Float64                            = Double;
  91.     TQ3Size                                = TQ3Uns32;
  92. {*****************************************************************************
  93.  **                                                                              **
  94.  **                                    File Types                                 **
  95.  **                                                                              **
  96.  ****************************************************************************}
  97.     TQ3FileModeMasks             = LONGINT;
  98. CONST
  99.     kQ3FileModeNormal            = {TQ3FileModeMasks}0;
  100.     kQ3FileModeStream            = {TQ3FileModeMasks}$01;
  101.     kQ3FileModeDatabase            = {TQ3FileModeMasks}$02;
  102.     kQ3FileModeText                = {TQ3FileModeMasks}$04;
  103.  
  104.  
  105. TYPE
  106.     TQ3FileMode                            = LONGINT;
  107. {*****************************************************************************
  108.  **                                                                              **
  109.  **                                    Method Types                             **
  110.  **                                                                              **
  111.  ****************************************************************************}
  112. {
  113.  *    IO Methods
  114.  *
  115.  *    The IO system treats all objects as groups of typed information.
  116.  *    When you register your element or attribute, the "elementType" is the 
  117.  *    binary type of your object, the "elementName" the ascii type.
  118.  *    
  119.  *    All objects in the metafile are made up of a "root" or parent object which
  120.  *    defines the instantiated object type. You may define the format of your 
  121.  *    data any way you wish as long as you use the primitives types above and the
  122.  *    routines below.
  123.  *
  124.  *    Root Objects are often appended with additional child objects, called 
  125.  *    subobjects. You may append your object with other QuickDraw 3D objects.
  126.  *    
  127.  *    Writing is straightforward: an object traverses itself any other objects 
  128.  *    that make it up, then writes its own data. Writing uses two methods: 
  129.  *    TQ3ObjectTraverseMethod and TQ3ObjectWriteMethod.
  130.  *
  131.  *    The TQ3ObjectTraverseMethod method should:
  132.  *    + First, Determine if the data should be written 
  133.  *        - if you don't want to write out your object after examining your
  134.  *            data, return kQ3Success in your Traverse method without calling
  135.  *            any other submit calls.
  136.  *     + Next, calculate the size of your object on disk
  137.  *     + Gather whatever state from the view you need to preserve
  138.  *         - you may access the view state NOW, as the state of the
  139.  *             view duing your TQ3ObjectWriteMethod will not be valid. You may
  140.  *             pass a temporary buffer to your write method.
  141.  *     + Submit your view write data using Q3View_SubmitWriteData
  142.  *         - note that you MUST call this before any other "_Submit" call.
  143.  *         - you may pass in a "deleteMethod" for your data. This method
  144.  *             will be called whether or not your write method succeeds or fails.
  145.  *     + Submit your subobjects to the view
  146.  *     
  147.  *     The TQ3ObjectWriteMethod method should:
  148.  *     + Write your data format to the file using the primitives routines below.
  149.  *         - If you passed a "deleteMethod" in your Q3View_SubmitWriteData, that
  150.  *             method will be called upon exit of your write method.
  151.  *
  152.  *    Reading is less straightforward because your root object and
  153.  *    any subobjects must be read inside of your TQ3ObjectReadDataMethod. There 
  154.  *    is an implicit state contained in the file while reading, which you must 
  155.  *    be aware of. When you first enter the read method, you must physically 
  156.  *    read in your data format using the primitives routines until
  157.  *    
  158.  *    Q3File_IsEndOfData(file) == kQ3True
  159.  *    
  160.  *    Generally, your data format should be self-descriptive such that you do not
  161.  *    need to call Q3File_IsEndOfData to determine if you are done reading. 
  162.  *    However, this call is useful for determining zero-sized object or 
  163.  *    determining the end of an object's data.
  164.  *    
  165.  *    Once you have read in all the data, you may collect subobjects. A metafile
  166.  *    object ONLY has subobjects if it is in a container. The call
  167.  *    
  168.  *    Q3File_IsEndOfContainer(file)
  169.  *    
  170.  *    returns kQ3False if subobjects exist, and kQ3True if subobjects do not 
  171.  *    exist.
  172.  *    
  173.  *    At this point, you may use
  174.  *    
  175.  *    Q3File_GetNextObjectType
  176.  *    Q3File_IsNextObjectOfType
  177.  *    Q3File_ReadObject
  178.  *    Q3File_SkipObject
  179.  *    
  180.  *    to iterate through the subobjects until Q3File_IsEndOfContainer(file) 
  181.  *    is kQ3True.
  182.  * 
  183.  }
  184. {
  185.  *    TQ3ObjectTraverseMethod
  186.  *
  187.  *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  188.  *    object. Sorry, custom objects will be available in the next major revision.
  189.  *
  190.  *    The "data" is a pointer to your internal element data.
  191.  *
  192.  *    The view is the current traversal view.
  193.  }
  194.     TQ3ObjectTraverseMethod = ProcPtr;  { FUNCTION TQ3ObjectTraverseMethod(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C; }
  195.  
  196.     TQ3ObjectWriteMethod = ProcPtr;  { FUNCTION TQ3ObjectWriteMethod(object: UNIV Ptr; theFile: TQ3FileObject): TQ3Status; C; }
  197.  
  198. {
  199.  *  Use Q3XView_SubmitWriteData instead...
  200.  }
  201.     TQ3DataDeleteMethod = ProcPtr;  { PROCEDURE TQ3DataDeleteMethod(data: UNIV Ptr); C; }
  202.  
  203. FUNCTION Q3View_SubmitWriteData(view: TQ3ViewObject; size: TQ3Size; data: UNIV Ptr; deleteData: TQ3DataDeleteMethod): TQ3Status; C;
  204. {
  205.  *    TQ3ObjectReadDataMethod
  206.  *
  207.  *  For "elements" (meaning "attributes", too), you must allocate stack space 
  208.  *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  209.  *
  210.  *    Otherwise, parentObject is whatever object your element is a subobject of...
  211.  }
  212.  
  213. TYPE
  214.     TQ3ObjectReadDataMethod = ProcPtr;  { FUNCTION TQ3ObjectReadDataMethod(parentObject: TQ3Object; theFile: TQ3FileObject): TQ3Status; C; }
  215.  
  216. {
  217.  * IO Methods
  218.  }
  219.  
  220. CONST
  221.     kQ3XMethodTypeObjectFileVersion = 'vers';                    {  version  }
  222.     kQ3XMethodTypeObjectTraverse = 'trvs';                        {  byte count  }
  223.     kQ3XMethodTypeObjectTraverseData = 'trvd';                    {  byte count  }
  224.     kQ3XMethodTypeObjectWrite    = 'writ';                        {  Dump info to file  }
  225.     kQ3XMethodTypeObjectReadData = 'rddt';                        {  Read info from file into buffer or, attach read data to parent  }
  226.     kQ3XMethodTypeObjectRead    = 'read';
  227.     kQ3XMethodTypeObjectAttach    = 'attc';
  228.  
  229. {
  230.  *    TQ3XObjectTraverseMethod
  231.  *
  232.  *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  233.  *    object. Sorry, custom objects will be available in the next major revision.
  234.  *
  235.  *    The "data" is a pointer to your internal element data.
  236.  *
  237.  *    The view is the current traversal view.
  238.  }
  239.  
  240. TYPE
  241.     TQ3XObjectTraverseMethod = ProcPtr;  { FUNCTION TQ3XObjectTraverseMethod(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C; }
  242.  
  243. {
  244.  *  TQ3XObjectTraverseDataMethod
  245.  }
  246.     TQ3XObjectTraverseDataMethod = ProcPtr;  { FUNCTION TQ3XObjectTraverseDataMethod(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C; }
  247.  
  248. {
  249.  *  TQ3XObjectWriteMethod
  250.  }
  251.     TQ3XObjectWriteMethod = ProcPtr;  { FUNCTION TQ3XObjectWriteMethod(object: UNIV Ptr; theFile: TQ3FileObject): TQ3Status; C; }
  252.  
  253. {
  254.  *  Custom object writing 
  255.  }
  256.     TQ3XDataDeleteMethod = ProcPtr;  { PROCEDURE TQ3XDataDeleteMethod(data: UNIV Ptr); C; }
  257.  
  258. FUNCTION Q3XView_SubmitWriteData(view: TQ3ViewObject; size: TQ3Size; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  259. FUNCTION Q3XView_SubmitSubObjectData(view: TQ3ViewObject; objectClass: TQ3XObjectClass; size: LONGINT; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  260. {
  261.  *  TQ3XObjectReadMethod
  262.  }
  263.  
  264. TYPE
  265.     TQ3XObjectReadMethod = ProcPtr;  { FUNCTION TQ3XObjectReadMethod(theFile: TQ3FileObject): TQ3Object; C; }
  266.  
  267. {
  268.  *    TQ3XObjectReadDataMethod
  269.  *
  270.  *  For "elements" (meaning "attributes", too), you must allocate stack space 
  271.  *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  272.  *
  273.  *    Otherwise, parentObject is whatever object your element is a subobject of...
  274.  }
  275.     TQ3XObjectReadDataMethod = ProcPtr;  { FUNCTION TQ3XObjectReadDataMethod(parentObject: TQ3Object; theFile: TQ3FileObject): TQ3Status; C; }
  276.  
  277. {
  278.  *  TQ3XObjectAttachMethod
  279.  }
  280.     TQ3XObjectAttachMethod = ProcPtr;  { FUNCTION TQ3XObjectAttachMethod(childObject: TQ3Object; parentObject: TQ3Object): TQ3Status; C; }
  281.  
  282.  
  283.  
  284. {*****************************************************************************
  285.  **                                                                              **
  286.  **                                Versioning                                     **
  287.  **                                                                              **
  288.  ****************************************************************************}
  289.     TQ3FileVersion                        = LONGINT;
  290. {*****************************************************************************
  291.  **                                                                              **
  292.  **                                String Constants                             **
  293.  **                                                                              **
  294.  ****************************************************************************}
  295. {*****************************************************************************
  296.  **                                                                              **
  297.  **                                File Routines                                 **
  298.  **                                                                              **
  299.  ****************************************************************************}
  300. {
  301.  * Creation and accessors
  302.  }
  303. FUNCTION Q3File_New: TQ3FileObject; C;
  304. FUNCTION Q3File_GetStorage(theFile: TQ3FileObject; VAR storage: TQ3StorageObject): TQ3Status; C;
  305. FUNCTION Q3File_SetStorage(theFile: TQ3FileObject; storage: TQ3StorageObject): TQ3Status; C;
  306. {
  307.  * Opening, and accessing "open" state, closing/cancelling
  308.  }
  309. FUNCTION Q3File_OpenRead(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  310. FUNCTION Q3File_OpenWrite(theFile: TQ3FileObject; mode: TQ3FileMode): TQ3Status; C;
  311. FUNCTION Q3File_IsOpen(theFile: TQ3FileObject; VAR isOpen: TQ3Boolean): TQ3Status; C;
  312. FUNCTION Q3File_GetMode(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  313. FUNCTION Q3File_GetVersion(theFile: TQ3FileObject; VAR version: TQ3FileVersion): TQ3Status; C;
  314. FUNCTION Q3File_Close(theFile: TQ3FileObject): TQ3Status; C;
  315. FUNCTION Q3File_Cancel(theFile: TQ3FileObject): TQ3Status; C;
  316. {
  317.  * Writing (Application)
  318.  }
  319. FUNCTION Q3View_StartWriting(view: TQ3ViewObject; theFile: TQ3FileObject): TQ3Status; C;
  320. FUNCTION Q3View_EndWriting(view: TQ3ViewObject): TQ3ViewStatus; C;
  321. {
  322.  * Reading (Application)
  323.  }
  324. FUNCTION Q3File_GetNextObjectType(theFile: TQ3FileObject): LONGINT; C;
  325. FUNCTION Q3File_IsNextObjectOfType(theFile: TQ3FileObject; ofType: TQ3ObjectType): TQ3Boolean; C;
  326. FUNCTION Q3File_ReadObject(theFile: TQ3FileObject): TQ3Object; C;
  327. FUNCTION Q3File_SkipObject(theFile: TQ3FileObject): TQ3Status; C;
  328. FUNCTION Q3File_IsEndOfData(theFile: TQ3FileObject): TQ3Boolean; C;
  329. FUNCTION Q3File_IsEndOfContainer(theFile: TQ3FileObject; rootObject: TQ3Object): TQ3Boolean; C;
  330. FUNCTION Q3File_IsEndOfFile(theFile: TQ3FileObject): TQ3Boolean; C;
  331. {    
  332.  *  External file references
  333.  }
  334. FUNCTION Q3File_MarkAsExternalReference(theFile: TQ3FileObject; sharedObject: TQ3SharedObject): TQ3Status; C;
  335. FUNCTION Q3File_GetExternalReferences(theFile: TQ3FileObject): TQ3GroupObject; C;
  336. {    
  337.  *  Tracking editing in read-in objects with custom elements
  338.  }
  339. FUNCTION Q3Shared_ClearEditTracking(sharedObject: TQ3SharedObject): TQ3Status; C;
  340. FUNCTION Q3Shared_GetEditTrackingState(sharedObject: TQ3SharedObject): TQ3Boolean; C;
  341. {    
  342.  *  Reading objects inside a group one-by-one
  343.  }
  344.  
  345. TYPE
  346.     TQ3FileReadGroupStateMasks     = LONGINT;
  347. CONST
  348.     kQ3FileReadWholeGroup        = {TQ3FileReadGroupStateMasks}0;
  349.     kQ3FileReadObjectsInGroup    = {TQ3FileReadGroupStateMasks}$01;
  350.     kQ3FileCurrentlyInsideGroup    = {TQ3FileReadGroupStateMasks}$02;
  351.  
  352.  
  353. TYPE
  354.     TQ3FileReadGroupState                = LONGINT;
  355. FUNCTION Q3File_SetReadInGroup(theFile: TQ3FileObject; readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  356. FUNCTION Q3File_GetReadInGroup(theFile: TQ3FileObject; VAR readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  357.  
  358. {
  359.  * Idling
  360.  }
  361.  
  362. TYPE
  363.     TQ3FileIdleMethod = ProcPtr;  { FUNCTION TQ3FileIdleMethod(theFile: TQ3FileObject; idlerData: UNIV Ptr): TQ3Status; C; }
  364.  
  365. FUNCTION Q3File_SetIdleMethod(theFile: TQ3FileObject; idle: TQ3FileIdleMethod; idleData: UNIV Ptr): TQ3Status; C;
  366.  
  367. {*****************************************************************************
  368.  **                                                                              **
  369.  **                                Primitives Routines                             **
  370.  **                                                                              **
  371.  ****************************************************************************}
  372. FUNCTION Q3NewLine_Write(theFile: TQ3FileObject): TQ3Status; C;
  373. FUNCTION Q3Uns8_Read(VAR data: TQ3Uns8; theFile: TQ3FileObject): TQ3Status; C;
  374. FUNCTION Q3Uns8_Write(data: ByteParameter; theFile: TQ3FileObject): TQ3Status; C;
  375. FUNCTION Q3Uns16_Read(VAR data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  376. FUNCTION Q3Uns16_Write(data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  377. FUNCTION Q3Uns32_Read(VAR data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  378. FUNCTION Q3Uns32_Write(data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  379. FUNCTION Q3Int8_Read(VAR data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  380. FUNCTION Q3Int8_Write(data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  381. FUNCTION Q3Int16_Read(VAR data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  382. FUNCTION Q3Int16_Write(data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  383. FUNCTION Q3Int32_Read(VAR data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  384. FUNCTION Q3Int32_Write(data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  385. FUNCTION Q3Uns64_Read(VAR data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  386. FUNCTION Q3Uns64_Write(data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  387. FUNCTION Q3Int64_Read(VAR data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  388. FUNCTION Q3Int64_Write(data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  389. FUNCTION Q3Float32_Read(VAR data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  390. FUNCTION Q3Float32_Write(data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  391. FUNCTION Q3Float64_Read(VAR data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  392. FUNCTION Q3Float64_Write(data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  393. FUNCTION Q3Size_Pad(size: TQ3Size): TQ3Size; C;
  394. {
  395.  * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
  396.  }
  397. FUNCTION Q3String_Read(data: CStringPtr; VAR length: LONGINT; theFile: TQ3FileObject): TQ3Status; C;
  398. FUNCTION Q3String_Write(data: ConstCStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  399.  * This call will read Q3Size_Pad(size) bytes,
  400.  *    but only place size bytes into data.
  401.  }
  402. FUNCTION Q3RawData_Read(VAR data: UInt8; size: LONGINT; theFile: TQ3FileObject): TQ3Status; C;
  403.  * This call will write Q3Size_Pad(size) bytes,
  404.  *    adding 0's to pad to the nearest 4 byte boundary.
  405.  }
  406. FUNCTION Q3RawData_Write({CONST}VAR data: UInt8; size: LONGINT; theFile: TQ3FileObject): TQ3Status; C;
  407. {*****************************************************************************
  408.  **                                                                              **
  409.  **                        Convenient Primitives Routines                         **
  410.  **                                                                              **
  411.  ****************************************************************************}
  412. FUNCTION Q3Point2D_Read(VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  413. FUNCTION Q3Point2D_Write({CONST}VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  414. FUNCTION Q3Point3D_Read(VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  415. FUNCTION Q3Point3D_Write({CONST}VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  416. FUNCTION Q3RationalPoint3D_Read(VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  417. FUNCTION Q3RationalPoint3D_Write({CONST}VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  418. FUNCTION Q3RationalPoint4D_Read(VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  419. FUNCTION Q3RationalPoint4D_Write({CONST}VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  420. FUNCTION Q3Vector2D_Read(VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  421. FUNCTION Q3Vector2D_Write({CONST}VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  422. FUNCTION Q3Vector3D_Read(VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  423. FUNCTION Q3Vector3D_Write({CONST}VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  424. FUNCTION Q3Matrix4x4_Read(VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  425. FUNCTION Q3Matrix4x4_Write({CONST}VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  426. FUNCTION Q3Tangent2D_Read(VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  427. FUNCTION Q3Tangent2D_Write({CONST}VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  428. FUNCTION Q3Tangent3D_Read(VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  429. FUNCTION Q3Tangent3D_Write({CONST}VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  430. {    This call affects only text Files - it is a no-op in binary files }
  431. FUNCTION Q3Comment_Write(comment: CStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  432. {*****************************************************************************
  433.  **                                                                              **
  434.  **                                Unknown Object                                 **
  435.  **                                                                              **
  436.  **        Unknown objects are generated when reading files which contain         **
  437.  **        custom data which has not been registered in the current             **
  438.  **        instantiation of QuickDraw 3D.                                         **
  439.  **                                                                              **
  440.  ****************************************************************************}
  441. FUNCTION Q3Unknown_GetType(unknownObject: TQ3UnknownObject): LONGINT; C;
  442. FUNCTION Q3Unknown_GetDirtyState(unknownObject: TQ3UnknownObject; VAR isDirty: TQ3Boolean): TQ3Status; C;
  443. FUNCTION Q3Unknown_SetDirtyState(unknownObject: TQ3UnknownObject; isDirty: TQ3Boolean): TQ3Status; C;
  444.  
  445. {*****************************************************************************
  446.  **                                                                              **
  447.  **                            Unknown Text Routines                             **
  448.  **                                                                              **
  449.  ****************************************************************************}
  450.  
  451. TYPE
  452.     TQ3UnknownTextDataPtr = ^TQ3UnknownTextData;
  453.     TQ3UnknownTextData = RECORD
  454.         objectName:                CStringPtr;                                {  '\0' terminated  }
  455.         contents:                CStringPtr;                                {  '\0' terminated  }
  456.     END;
  457.  
  458. FUNCTION Q3UnknownText_GetData(unknownObject: TQ3UnknownObject; VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  459. FUNCTION Q3UnknownText_EmptyData(VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  460.  
  461. {*****************************************************************************
  462.  **                                                                              **
  463.  **                            Unknown Binary Routines                             **
  464.  **                                                                              **
  465.  ****************************************************************************}
  466.  
  467. TYPE
  468.     TQ3UnknownBinaryDataPtr = ^TQ3UnknownBinaryData;
  469.     TQ3UnknownBinaryData = RECORD
  470.         objectType:                TQ3ObjectType;
  471.         size:                    LONGINT;
  472.         byteOrder:                TQ3Endian;
  473.         contents:                CStringPtr;
  474.     END;
  475.  
  476. FUNCTION Q3UnknownBinary_GetData(unknownObject: TQ3UnknownObject; VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  477. FUNCTION Q3UnknownBinary_EmptyData(VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  478.  
  479. FUNCTION Q3UnknownBinary_GetTypeString(unknownObject: TQ3UnknownObject; VAR typeString: CStringPtr): TQ3Status; C;
  480. FUNCTION Q3UnknownBinary_EmptyTypeString(VAR typeString: CStringPtr): TQ3Status; C;
  481. {*****************************************************************************
  482.  **                                                                              **
  483.  **                            ViewHints routines                                 **
  484.  **                                                                              **
  485.  **        ViewHints are an object in a metafile to give you some hints on how     **
  486.  **        to render a scene.    You may create a view with any of the objects     **
  487.  **        retrieved from it, or you can just throw it away.                     **
  488.  **                                                                              **
  489.  **        To write a view hints to a file, create a view hints object from a     **
  490.  **        view and write the view hints.                                         **
  491.  **                                                                              **
  492.  ****************************************************************************}
  493. FUNCTION Q3ViewHints_New(view: TQ3ViewObject): TQ3ViewHintsObject; C;
  494. FUNCTION Q3ViewHints_SetRenderer(viewHints: TQ3ViewHintsObject; renderer: TQ3RendererObject): TQ3Status; C;
  495. FUNCTION Q3ViewHints_GetRenderer(viewHints: TQ3ViewHintsObject; VAR renderer: TQ3RendererObject): TQ3Status; C;
  496. FUNCTION Q3ViewHints_SetCamera(viewHints: TQ3ViewHintsObject; camera: TQ3CameraObject): TQ3Status; C;
  497. FUNCTION Q3ViewHints_GetCamera(viewHints: TQ3ViewHintsObject; VAR camera: TQ3CameraObject): TQ3Status; C;
  498. FUNCTION Q3ViewHints_SetLightGroup(viewHints: TQ3ViewHintsObject; lightGroup: TQ3GroupObject): TQ3Status; C;
  499. FUNCTION Q3ViewHints_GetLightGroup(viewHints: TQ3ViewHintsObject; VAR lightGroup: TQ3GroupObject): TQ3Status; C;
  500. FUNCTION Q3ViewHints_SetAttributeSet(viewHints: TQ3ViewHintsObject; attributeSet: TQ3AttributeSet): TQ3Status; C;
  501. FUNCTION Q3ViewHints_GetAttributeSet(viewHints: TQ3ViewHintsObject; VAR attributeSet: TQ3AttributeSet): TQ3Status; C;
  502. FUNCTION Q3ViewHints_SetDimensionsState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  503. FUNCTION Q3ViewHints_GetDimensionsState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  504. FUNCTION Q3ViewHints_SetDimensions(viewHints: TQ3ViewHintsObject; width: LONGINT; height: LONGINT): TQ3Status; C;
  505. FUNCTION Q3ViewHints_GetDimensions(viewHints: TQ3ViewHintsObject; VAR width: LONGINT; VAR height: LONGINT): TQ3Status; C;
  506. FUNCTION Q3ViewHints_SetMaskState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  507. FUNCTION Q3ViewHints_GetMaskState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  508. FUNCTION Q3ViewHints_SetMask(viewHints: TQ3ViewHintsObject; {CONST}VAR mask: TQ3Bitmap): TQ3Status; C;
  509. FUNCTION Q3ViewHints_GetMask(viewHints: TQ3ViewHintsObject; VAR mask: TQ3Bitmap): TQ3Status; C;
  510. { Call Q3Bitmap_Empty when done with the mask    }
  511. FUNCTION Q3ViewHints_SetClearImageMethod(viewHints: TQ3ViewHintsObject; clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  512. FUNCTION Q3ViewHints_GetClearImageMethod(viewHints: TQ3ViewHintsObject; VAR clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  513. FUNCTION Q3ViewHints_SetClearImageColor(viewHints: TQ3ViewHintsObject; {CONST}VAR color: TQ3ColorARGB): TQ3Status; C;
  514. FUNCTION Q3ViewHints_GetClearImageColor(viewHints: TQ3ViewHintsObject; VAR color: TQ3ColorARGB): TQ3Status; C;
  515.  
  516.  
  517. {$ALIGN RESET}
  518. {$POP}
  519.  
  520. {$SETC UsingIncludes := QD3DIOIncludes}
  521.  
  522. {$ENDC} {__QD3DIO__}
  523.  
  524. {$IFC NOT UsingIncludes}
  525.  END.
  526. {$ENDC}
  527.